<template>
  <div class="container">
    <div class="image-container">
      <EncryptImage :src="props.item.image_url" object-fit="cover" :border-radius="10"></EncryptImage>
      <div class="hover-text-container">
        <div class="hover-text">#{{ props.item.keyword }}</div>
      </div>
    </div>
  </div>
</template>
<script setup>
import EncryptImage from '../multimedia/EncryptImage.vue'

const props = defineProps({
  item: {
    type: Object,
    required: true,
  },
})
</script>
<style scoped lang="scss">
.container {
  margin: 0.25rem;
  max-height: 7.5rem;

  .image-container {
    width: 100%;
    height: 7.5rem;
    background-color: #8c8c8c;
    border-radius: 0.625rem;

    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.hover-text-container {
  height: 3.375rem;
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3.125rem;

  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem;
  padding: 0.375rem 1rem;

  .hover-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 0.875rem;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }
}
</style>
